package com.tree.thrive.business.el.service;

import com.alibaba.fastjson.JSON;
import com.tree.thrive.business.el.Lock;
import com.tree.thrive.business.input.domain.req.InputCheckReq;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * top-tree
 *
 * @Auther: cheng.tang
 * @Date: 2022/7/12 3:21 PM
 * @Description:
 */
@Service
@Slf4j
public class SpringELServiceImpl implements SpringELService {


    @Lock(path = "#list[0].name")
    @Override
    public void springELArray(List<InputCheckReq> list) {
        log.info(" list {} ", JSON.toJSONString(list));
    }

    @Lock(path = "#inputCheckReq.buildLockKey()")
    @Override
    public void springELArgsMethod(InputCheckReq inputCheckReq) {
        log.info("inputCheckReq {} ", JSON.toJSONString(inputCheckReq));
    }


}
